package org.lds.logger.xml;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class XMLAppender {
    @XStreamAlias("name")
    @XStreamAsAttribute
    private String name;
    @XStreamAlias("clazz")
    @XStreamAsAttribute
    private String clazz;
    @XStreamAlias("priority")
    @XStreamAsAttribute
    private String priority;

    @XStreamAlias("destination")
    private String destination;

    @XStreamAlias("filterRef")
    private String filterRef;
    @XStreamAlias("layoutRef")
    private String layoutRef;
    @XStreamAlias("rollingStrategyRef")
    private String rollingStrategyRef;

    @XStreamAlias("extJson")
    private String extJson;

    public XMLAppender(String name, String clazz, String priority, String destination, String filterRef, String layoutRef, String rollingStrategyRef) {
        this(name, clazz, priority, destination, filterRef, layoutRef, rollingStrategyRef, null);
    }
}
